/*
 * Copyright (c) 2006, 2023, webrx.cn All rights reserved.
 *
 */

package cn.webrx;

import java.util.Arrays;
import java.util.Random;

/**
 * <p>Project: jse2303 - Ex5
 * <p>Powered by webrx On 2023-07-13 09:15:31
 * <p>描述：<p>
 *
 * @author webrx [webrx@126.com]
 * @version 1.0
 * @since 17
 */
public class Ex5 {
    public static void main(String[] args) {
        //red 1-32 6

        //blue 1-16 1

        Random rand = new Random();
        for (int n = 5; n > 0; n--) {
            //red balls
            int[] reds = new int[6];
            ok:
            for (int i = 0; i < reds.length; i++) {
                int t = rand.nextInt(1, 33);
                for (int j = 0; j < reds.length; j++) {
                    if (t == reds[j]) {
                        i--;
                        continue ok;
                    }
                }
                reds[i] = t;
            }
            Arrays.sort(reds);
            System.out.print("\033[31m" + Arrays.toString(reds) + "\033[0m");

            int[] blue = new int[]{rand.nextInt(1, 17)};
            System.out.println("  \033[36m" + Arrays.toString(blue) + "\033[0m");
            System.out.println();

        }

    }
}
